home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Code Resources / Jims CDEFs 1.50 / demo Source ƒ / demoTab.r < prev    next >
Encoding:
Text File  |  1995-10-27  |  7.1 KB  |  245 lines  |  [TEXT/KAHL]

  1. // -----------------------------------------------------------------------------
  2. //    File    : demoTab.r
  3. //    Date    : November 5, 1994
  4. //    Author    : Jim Stout
  5. //    Purpose    : resource descriptions for a couple of tabPanels that demonstrate
  6. //            : a single row panel and panels with other than 4 tabs per row.
  7. // -----------------------------------------------------------------------------
  8. #define SystemSevenOrLater 1
  9. #include <Types.r>
  10. #include "jimsCDEF.h"
  11.  
  12. #define ROW1 16            // best control size for 1, 2 and 3 rows of tabs
  13. #define ROW2 32
  14. #define ROW3 48
  15.  
  16. // -----------------------------------------------------------------------------
  17. // the first tabDemo shows a panel with 2 rows of 5 tabs each rather than the
  18. // default of 4 tabs per row.
  19. // -----------------------------------------------------------------------------
  20. resource 'dctb' (160, purgeable) {
  21.     {
  22.         /* [1] */        wContentColor, 65535,65535,65535,        // white
  23.         /* [2] */        wFrameColor, 0, 0, 0,
  24.         /* [3] */        wTextColor, 0, 0, 0,
  25.         /* [4] */        wHiliteColor, 0, 0, 0,
  26.         /* [5] */        wTitleBarColor, 65535, 65535, 65535
  27.     }
  28. };
  29.  
  30. resource 'DLOG' (160, "Tab Demo 1", purgeable) {
  31.     {44, 20, 334, 470},    movableDBoxProc,    invisible,    nogoAway,    0x0,    160,
  32.     "Tab Demo 1",
  33. #if SystemSevenOrLater
  34.     centerMainScreen
  35. #endif
  36. };
  37.  
  38. resource 'DITL' (160, "Tab Demo 1", purgeable) {
  39.     {
  40.     /* [1] */    {257, 379, 277, 437},    Button        {    enabled,    "OK"    },
  41.     /* [2] */    {257, 308, 277, 366},    Button         {    enabled,    "Cancel"},
  42.     /* [3] */    {13, 13, 13+ROW2, 437},    Control        {    enabled,    160        },
  43.     /* [4] */    {257, 13, 277, 300},    StaticText    {    disabled, 
  44.                                                     "Press cmd-Tab or cntl-Tab"}
  45.     }
  46. };
  47.  
  48. resource 'CNTL' (160, "5 tabs", purgeable) {
  49.     {13, 13, 13+ROW2, 437},    
  50.     1,    
  51.     visible,    
  52.     10,        
  53.     230,    
  54.     16*tabPanel,    
  55.         
  56.     5,            // ask for 5 tabs per row - 2 full rows
  57.     
  58.     "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
  59. };
  60.  
  61. // -----------------------------------------------------------------------------
  62. // the second tabDemo shows a panel with 3 rows of 3 tabs each rather than the
  63. // default of 4 tabs per row.
  64. // -----------------------------------------------------------------------------
  65. resource 'dctb' (180, purgeable) {
  66.     {
  67.         /* [1] */        wContentColor, 61166,61166,61166,        // gray
  68.         /* [2] */        wFrameColor, 0, 0, 0,
  69.         /* [3] */        wTextColor, 0, 0, 0,
  70.         /* [4] */        wHiliteColor, 0, 0, 0,
  71.         /* [5] */        wTitleBarColor, 65535, 65535, 65535
  72.     }
  73. };
  74.  
  75. resource 'DLOG' (180, "Tab Demo 2", purgeable) {
  76.     {44, 20, 334, 470},    movableDBoxProc,    invisible,    nogoAway,    0x0,    180,
  77.     "Tab Demo 2",
  78. #if SystemSevenOrLater
  79.     centerMainScreen
  80. #endif
  81. };
  82.  
  83. resource 'DITL' (180, "Tab Demo 2", purgeable) {
  84.     {
  85.     /* [1] */    {257, 379, 277, 437},    Button        {    enabled,    "OK"    },
  86.     /* [2] */    {257, 308, 277, 366},    Button         {    enabled,    "Cancel"},
  87.     /* [3] */    {13, 13, 13+ROW3, 437},    Control        {    enabled,    180        },
  88.     /* [4] */    {257, 13, 277, 300},    StaticText    {    disabled, 
  89.                                                     "Press cmd-Tab or cntl-Tab"}
  90.     }
  91. };
  92.  
  93. resource 'CNTL' (180, "3 tabs", purgeable) {
  94.     {13, 13, 13+ROW3, 437},    
  95.     1,    
  96.     visible,    
  97.     9,        
  98.     230,    
  99.     16*tabPanel,        
  100.     
  101.     3,        // ask for 3 tabs per row - 3 full rows
  102.     
  103.     "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
  104. };
  105.  
  106. // -----------------------------------------------------------------------------
  107. // the third tabDemo shows a panel with 10 tabs, but using the default of 4
  108. // tabs per row - which results in 2 rows of 4 tabs and 1 row of 2 tabs.
  109. // -----------------------------------------------------------------------------
  110. resource 'dctb' (190, purgeable) {
  111.     {
  112.         /* [1] */        wContentColor, 52428,52428,52428,        // gray
  113.         /* [2] */        wFrameColor, 0, 0, 0,
  114.         /* [3] */        wTextColor, 0, 0, 0,
  115.         /* [4] */        wHiliteColor, 0, 0, 0,
  116.         /* [5] */        wTitleBarColor, 65535, 65535, 65535
  117.     }
  118. };
  119.  
  120. resource 'DLOG' (190, "Tab Demo 3", purgeable) {
  121.     {44, 20, 334, 470},    movableDBoxProc,    invisible,    nogoAway,    0x0,    190,
  122.     "Tab Demo 3",
  123. #if SystemSevenOrLater
  124.     centerMainScreen
  125. #endif
  126. };
  127.  
  128. resource 'DITL' (190, "Tab Demo 3", purgeable) {
  129.     {
  130.     /* [1] */    {257, 379, 277, 437},    Button        {    enabled,    "OK"    },
  131.     /* [2] */    {257, 308, 277, 366},    Button         {    enabled,    "Cancel"},
  132.     /* [3] */    {13, 13, 13+ROW3, 437},    Control        {    enabled,    190        },
  133.     /* [4] */    {257, 13, 277, 300},    StaticText    {    disabled, 
  134.                                                     "Press cmd-Tab or cntl-Tab"}
  135.     }
  136. };
  137.  
  138. resource 'CNTL' (190, "4 tabs", purgeable) {
  139.     {13, 13, 13+ROW3, 437},    
  140.     1,    
  141.     visible,    
  142.     10,        
  143.     230,    
  144.     16*tabPanel,    
  145.         
  146.     $00280000,        // a 'notch' of 40 and default to 4 tabs 
  147.                     // per row - 2 full, 1 partial row
  148.     
  149.     "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
  150. };
  151. // -----------------------------------------------------------------------------
  152. // the fourth tabDemo shows a panel with 10 tabs, but all in a single row.
  153. // -----------------------------------------------------------------------------
  154. resource 'dctb' (200, purgeable) {
  155.     {
  156.         /* [1] */        wContentColor, 52428,52428,52428,        // gray
  157.         /* [2] */        wFrameColor, 0, 0, 0,
  158.         /* [3] */        wTextColor, 0, 0, 0,
  159.         /* [4] */        wHiliteColor, 0, 0, 0,
  160.         /* [5] */        wTitleBarColor, 65535, 65535, 65535
  161.     }
  162. };
  163.  
  164. resource 'DLOG' (200, "Tab Demo 4", purgeable) {
  165.     {44, 20, 334, 470},    movableDBoxProc,    invisible,    nogoAway,    0x0,    200,
  166.     "Tab Demo 4",
  167. #if SystemSevenOrLater
  168.     centerMainScreen
  169. #endif
  170. };
  171.  
  172. resource 'DITL' (200, "Tab Demo 4", purgeable) {
  173.     {
  174.     /* [1] */    {257, 379, 277, 437},    Button        {    enabled,    "OK"    },
  175.     /* [2] */    {257, 308, 277, 366},    Button         {    enabled,    "Cancel"},
  176.     /* [3] */    {13, 13, 13+ROW1, 437},    Control        {    enabled,    200        },
  177.     /* [4] */    {257, 13, 277, 300},    StaticText    {    disabled, 
  178.                                                     "Press cmd-Tab or cntl-Tab"}
  179.     }
  180. };
  181.  
  182. resource 'CNTL' (200, "1 row of tabs", purgeable) {
  183.     {13, 13, 13+ROW1, 437},    
  184.     1,    
  185.     visible,    
  186.     10,        
  187.     230,    
  188.     16*tabPanel+oneTabRow,    
  189.     0,
  190.     "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
  191. };
  192.  
  193. // -----------------------------------------------------------------------------
  194. // the following DITLs are shared by all of the demos above.
  195. // -----------------------------------------------------------------------------
  196. resource 'DITL' (161, "Tab panel 1", purgeable) {
  197.     {
  198.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 1"    }
  199.     }
  200. };
  201. resource 'DITL' (162, "Tab panel 2", purgeable) {
  202.     {
  203.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 2"    }
  204.     }
  205. };
  206. resource 'DITL' (163, "Tab panel 3", purgeable) {
  207.     {
  208.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 3"    }
  209.     }
  210. };
  211. resource 'DITL' (164, "Tab panel 4", purgeable) {
  212.     {
  213.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 4"    }
  214.     }
  215. };
  216. resource 'DITL' (165, "Tab panel 5", purgeable) {
  217.     {
  218.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 5"    }
  219.     }
  220. };
  221. resource 'DITL' (166, "Tab panel 6", purgeable) {
  222.     {
  223.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 6"    }
  224.     }
  225. };
  226. resource 'DITL' (167, "Tab panel 7", purgeable) {
  227.     {
  228.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 7"    }
  229.     }
  230. };
  231. resource 'DITL' (168, "Tab panel 8", purgeable) {
  232.     {
  233.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 8"    }
  234.     }
  235. };
  236. resource 'DITL' (169, "Tab panel 9", purgeable) {
  237.     {
  238.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 9"    }
  239.     }
  240. };
  241. resource 'DITL' (170, "Tab panel 10", purgeable) {
  242.     {
  243.     /* [1] */    {66, 20, 82, 220},    StaticText    {    disabled,    "Panel 10"    }
  244.     }
  245. };